package com.zwy.ubts.service.impl;

import com.zwy.ubts.bean.BookType;
import com.zwy.ubts.bean.User;
import com.zwy.ubts.dao.BookTypeDao;
import com.zwy.ubts.dao.UserDao;
import com.zwy.ubts.service.BaseService;
import com.zwy.ubts.service.BookTypeService;

import java.util.List;

/**
 * @Author Zhou Wenying
 * @Description:
 * @Date Created in 15:22 2023/3/7
 */
public class BookTypeServiceImpl extends BaseService<BookTypeDao> implements BookTypeService {
    @Override
    public List<BookType> queryBookTypes() {
        return baseDao.queryBookTypes();
    }

    @Override
    public BookType queryBookTypeById(Integer id) {
        return baseDao.queryBookTypeById(id);
    }

    @Override
    public Integer deleteBookTypeById(Integer id) {
        Integer integer = baseDao.deleteBookTypeById(id);
        commit();
        return integer;
    }

    @Override
    public Integer insertBookType(BookType bookType) {
        Integer integer = baseDao.insertBookType(bookType);
        commit();
        return integer;
    }

    @Override
    public Integer updateBookTypeById(BookType bookType) {
        Integer integer = baseDao.UpdateBooktypeById(bookType);
        commit();
        return integer;
    }
}
